import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        
    }
    /**
     * 敲笨钟
     * @param args
     */
    public static void main2(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        sc.nextLine();
        for(int i=0;i<n;i++){
            String str=sc.nextLine();
            System.out.println(poem(str));
        }
    }
    public static String poem(String str){
        String[] poemPart=str.split(",");
        String[] arr1=poemPart[0].split(" ");
        String[] arr2=poemPart[1].split(" ");
        int m=arr2.length;
        if(isTrue(arr1,arr2)){
            arr2[m-3]="qiao";
            arr2[m-2]="ben";
            arr2[m-1]="zhong.";
            String newStr=poemPart[0]+","+String.join(" ",arr2);
            return newStr;
        }
        return "Skipped";
    }
    public static boolean isTrue(String[] arr1,String[] arr2){
        int n=arr1.length;
        int m=arr2.length;
        String str1=arr1[n-1];
        String str2=arr2[m-1];
        return str1.endsWith("ong")&& str2.endsWith("ong.");
    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        System.out.println(resString(str));
    }

    /**
     * 6翻了
     * @param str
     * @return
     */
    public static String resString(String str){
        StringBuilder result=new StringBuilder();
        for(int i=0;i<str.length();i++){
            if(str.charAt(i)=='6'){
                int count=0;
                while(i+count<str.length()&&str.charAt(i+count)=='6'){
                    count++;
                }
                if(count>9){
                    result.append("27");
                }else if(count>3){
                    result.append("9");
                }else{
                    for(int k=0;k<count;k++){
                        result.append("6");
                    }
                }
                i+=count-1;
            }else{
                result.append(str.charAt(i));
            }
        }
        return result.toString();
    }
}